package com.iwhalecloud.citybrain.flow.platform.manager.infrastructure.mapper;

import com.iwhalecloud.citybrain.flow.platform.manager.infrastructure.entities.FlowAppInfo;
import com.iwhalecloud.citybrain.flow.platform.manager.infrastructure.entities.FlowTaskInstApprover;
import com.iwhalecloud.citybrain.flow.platform.manager.infrastructure.entities.FlowTaskInstApproverExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: niechanggang
 * @date:2021/9/2 11:01
 * @description:
 */
public interface FlowTaskInstApproverDAO {

    int  insertSelective(FlowTaskInstApprover  flowTaskInstApprover);

    List<FlowTaskInstApprover>  selectListByTaskId(@Param("taskId")String taskId);

    int  updateByExampleSelective(@Param("record")  FlowTaskInstApprover  record, @Param("example") FlowTaskInstApproverExample example);

    /**
     * 根据任务id，统计已读任务数
     * @return
     */
    Integer countReadedTask (@Param("taskIds") List<String> taskIds);

    FlowTaskInstApprover selectByByTaskIdAndUserId(@Param("taskId")String taskId,@Param("userId")String userId);

    int updateByPrimaryKeySelective(FlowTaskInstApprover  record);

}
